package com.king.pattem.factory.simpleFactory;

import com.king.pattem.factory.simpleFactory.car.ICar;
import com.king.pattem.factory.simpleFactory.factory.CarFactory;

/**
 *	简单工厂模式测试类 
 * @author taomk
 */
public class SimpleFactoryTest {

	public static void main(String[] args) {
                
		ICar car;
		try {
			System.out.println(" Simple Factory Test ：");
			car = CarFactory.buildCar("Benz");
			car.drive(); 
			
			car = CarFactory.buildCar("Bmw");
			car.drive(); 
		} catch (Exception e) {
			e.printStackTrace();
		} 
		
	}
}
